import React, { Component } from 'react'
import { BrowserRouter as Router, Link, Route, Switch } from 'react-router-dom'
import Home from './pages/Home'
import My from './pages/My'
import Friends from './pages/Friends'
export default class App extends Component {
  render() {
    return (
      <Router>
        <div>
          <ul>
            <li>
              <Link to="/home">首页</Link>
            </li>
            <li>
              <Link to="/my">我的音乐</Link>
            </li>
            <li>
              <Link to="/friends">我的好友</Link>
            </li>
          </ul>
          <hr />
          <Switch>
            <Route path="/home" component={Home}></Route>
            <Route path="/my" component={My}></Route>
            <Route path="/friends" component={Friends}></Route>
          </Switch>
        </div>
      </Router>
    )
  }
}
